.product-detail {
  background-color: #fff;
  min-height: 100vh;

  .breadcrumb {
    padding: 12px 0;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    font-size: 12px;

    @media (max-width: 768px) {
      display: none;
    }
  }

  .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;

    @media (max-width: 768px) {
      padding: 0;
    }
  }

  .product-grid {
    display: grid;
    grid-template-columns: minmax(300px, 40%) minmax(400px, 1fr) 250px;
    gap: 30px;
    padding: 20px 0;

    @media (max-width: 1200px) {
      grid-template-columns: minmax(300px, 40%) 1fr;
      
      .buy-box {
        grid-column: 1 / -1;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background: #fff;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
      
      }
    }

    @media (max-width: 768px) {
      grid-template-columns: 1fr;
      gap: 0;
      padding: 0;
    }
  }

  // 左侧图片区域
  .product-gallery {
    position: sticky;
    top: 20px;
    
    @media (max-width: 768px) {
      position: relative;
      top: 0;
      padding: 12px;
    }

    .main-image {
      width: 100%;
      height: 400px;
      margin-bottom: 15px;
      border: 1px solid #eee;
      
      .el-image {
        width: 100%;
        height: 100%;
        
        &:hover {
          cursor: zoom-in;
        }
      }

      @media (max-width: 768px) {
        height: 300px;
      }
    }

    .thumbnail-list {
      display: grid;
      grid-template-columns: repeat(auto-fill, 60px);
      gap: 8px;
      
      .thumbnail {
        width: 60px;
        height: 60px;
        border: 1px solid #ddd;
        padding: 2px;
        cursor: pointer;
        
        &:hover {
          border-color: #e77600;
          box-shadow: 0 0 3px 2px rgba(228, 121, 17, 0.5);
        }
        
        &.active {
          border-color: #e77600;
          box-shadow: 0 0 3px 2px rgba(228, 121, 17, 0.5);
        }
        
        img {
          width: 100%;
          height: 100%;
          object-fit: contain;
        }
      }
    }
  }

  // 中间商品信息区域
  .product-info {
    padding: 0 20px;

    @media (max-width: 768px) {
      padding: 12px;
      border-bottom: 1px solid #eee;
    }

    .title {
      font-size: 24px;
      font-weight: 400;
      line-height: 32px;
      margin: 0 0 8px;
      color: #0F1111;

      @media (max-width: 768px) {
        font-size: 18px;
        line-height: 24px;
      }
    }

    .brand {
      margin-bottom: 8px;
      
      a {
        color: #007185;
        text-decoration: none;
        
        &:hover {
          color: #C7511F;
          text-decoration: underline;
        }
      }
    }

    .divider {
      height: 1px;
      background: #ddd;
      margin: 15px 0;
    }

    .rating-section {
      .rating-row {
        display: flex;
        align-items: center;
        gap: 10px;
        
        .review-count {
          color: #007185;
          text-decoration: none;
          cursor: pointer;
          
          &:hover {
            color: #C7511F;
            text-decoration: underline;
          }
        }
      }

      .amazon-choice {
        margin-top: 10px;
        display: flex;
        align-items: center;
        gap: 8px;
        
        img {
          height: 24px;
        }
        
        span {
          color: #002F36;
          font-size: 14px;
        }
      }
    }

    .price-section {
      .price-row {
        display: flex;
        align-items: baseline;
        gap: 8px;
        
        .label {
          color: #565959;
        }
        
        .current-price {
          font-size: 28px;
          color: #0F1111;
        }
      }

      .original-price {
        color: #565959;
        margin-top: 4px;
        
        .strikethrough {
          text-decoration: line-through;
        }
      }

      .prime-info {
        margin-top: 8px;
        display: flex;
        align-items: center;
        gap: 8px;
        
        img {
          height: 20px;
        }
        
        span {
          color: #002F36;
          font-size: 14px;
        }
      }
    }

    .features-section {
      h3 {
        font-size: 16px;
        font-weight: 700;
        margin: 0 0 12px;
      }

      .feature-list {
        padding-left: 18px;
        margin: 0;
        
        li {
          margin-bottom: 8px;
          color: #0F1111;
          line-height: 20px;
        }
      }
    }

    .specs-table {
      width: 100%;
      border-collapse: collapse;
      
      th, td {
        padding: 8px;
        border-bottom: 1px solid #eee;
        text-align: left;
      }
      
      th {
        width: 150px;
        color: #565959;
        font-weight: normal;
      }
      
      td {
        color: #0F1111;
      }
    }
  }

  // 右侧购买区域
  .buy-box {
    padding: 20px;
    border: 1px solid #D5D9D9;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 250px;

    .price {
      font-size: 24px;
      color: #B12704;
      margin-bottom: 10px;
      width: 100%;
      text-align: center;
    }
    .pricew{
      font-size: 20px;
    }

    .stock-info,
    .delivery-info,
    .quantity-selector,
    .action-buttons {
      width: 200px;
      margin: 10px 0;
    }

    .stock-info {
      text-align: left;

      .stock-status {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 14px;
        font-weight: 500;
        
        .el-icon {
          font-size: 16px;
        }
        
        &.in-stock {
          color: #007600;
          .el-icon {
            color: #007600;
          }
        }
        
        &.low-stock {
          color: #C60;
          .el-icon {
            color: #C60;
          }
        }
        
        &.out-of-stock {
          color: #B12704;
        }
      }
      
      .stock-quantity {
        font-size: 14px;
        color: #C60;
        margin-top: 4px;
        font-weight: normal;
      }

      @media (max-width: 1200px) {
        .stock-status,
        .stock-quantity {
          display: inline-flex;
          margin: 0;
        }
        
        .stock-quantity {
          margin-left: 8px;
          &::before {
            content: '-';
            margin-right: 8px;
            color: #565959;
          }
        }
      }
    }

    .delivery-info {
      text-align: left;

      .prime-delivery {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #002F36;
        margin-bottom: 8px;
        width: 100%;
        font-size: 14px;
        
        .el-icon {
          font-size: 16px;
          color: #565959;
        }
      }

      .delivery-location {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #565959;
        font-size: 14px;
        width: 100%;
        margin-top: 4px;
        
        .el-icon {
          font-size: 16px;
          flex-shrink: 0;
        }

        span {
          display: flex;
          align-items: center;
          gap: 4px;
        }
        
        .location-text {
          color: #0F1111;
        }
      }

      @media (max-width: 1200px) {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0;

        .prime-delivery,
        .delivery-location {
          display: inline-flex;
          width: auto;
          margin: 0;
          height: 20px;
          align-items: center;
        }

        .delivery-location {
          position: relative;
          margin-left: 12px;
          padding-left: 12px;

          &::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 1px;
            height: 12px;
            background-color: #DDD;
          }
        }

        .el-icon {
          position: relative;
          top: -1px;
        }
      }

      @media (max-width: 768px) {
        .prime-delivery,
        .delivery-location {
          font-size: 13px;
        }
      }
    }

    .quantity-selector {
      text-align: left;
      
      .label {
        display: block;
        margin-bottom: 8px;
        color: #0F1111;
      }

      .el-input-number {
        width: 100%;
        height: 40px;
      }
    }

    .action-buttons {
      text-align: center;

      .add-to-cart,
      .buy-now {
        width: 100%;
        height: 40px;
        margin: 5px 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        font-weight: 500;
        border-radius: 20px;
        border: 1px solid;
        transition: all 0.1s linear;

        &:hover {
          filter: brightness(95%);
        }
      }

      .add-to-cart {
        background: #FFD814;
        border-color: #FCD200;
        color: #0F1111;
      }

      .buy-now {
        background: #FFA41C;
        border-color: #FF8F00;
        color: #0F1111;
      }

      .add-to-cart:disabled,
      .buy-now:disabled {
        background: #F7F8F8;
        border-color: #D5D9D9;
        color: #999;
        cursor: not-allowed;
      }
    }

    .secure-transaction {
      margin-top: 15px;
      width: 100%;
      justify-content: center;
      display: flex;
      align-items: center;
      gap: 8px;
      color: #007600;
      font-size: 12px;
    }

    @media (max-width: 1200px) {
      width: 100%;
      flex-direction: row;
      align-items: center;
      flex-wrap: wrap;
      gap: 16px;
      padding: 16px;
      border: none;
      border-radius: 0;
      background: #fff;
      box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.15);

      .price {
        order: 1;
        margin: 0;
        flex: 0 0 auto;
        text-align: left;
      }

      .stock-info {
        order: 2;
        margin: 0;
        flex: 1;
        min-width: 150px;
        width: auto;
      }

      .delivery-info {
        order: 3;
        margin: 0;
        flex: 1;
        min-width: 200px;
        width: auto;
      }

      .quantity-selector {
        order: 4;
        margin: 0;
        flex: 0 0 auto;
        width: auto;
        display: flex;
        align-items: center;
        gap: 10px;

        .label {
          margin: 0;
          display: inline;
          white-space: nowrap;
        }

        .el-input-number {
          width: 120px;
        }
      }

      .action-buttons {
        order: 5;
        width: 100%;
        margin: 0;
        padding-top: 12px;
        display: flex;
        gap: 12px;

        .add-to-cart,
        .buy-now {
          flex: 1;
          margin: 0;
          height: 42px;
        }
      }
    }

    @media (max-width: 768px) {
      padding: 12px;
      gap: 12px;
    }
  }

  // 商品详情标签页
  .product-tabs {
    margin-top: 30px;
    padding: 0 20px;

    @media (max-width: 768px) {
      margin-top: 12px;
      padding: 0 12px;
      margin-bottom: 80px;
    }

    .details-content {
      padding: 20px 0;
    }

    .specs-content {
      padding: 20px 0;
    }

    .reviews-content {
      padding: 20px 0;

      .reviews-summary {
        margin-bottom: 30px;

        .rating-overview {
          display: flex;
          gap: 40px;

          @media (max-width: 768px) {
            flex-direction: column;
            gap: 20px;
          }

          .average-rating {
            display: flex;
            flex-direction: column;
            align-items: center;
            
            .rating-number {
              font-size: 48px;
              color: #0F1111;
              line-height: 1.2;
            }
            
            .total-reviews {
              color: #565959;
              margin-top: 8px;
            }
          }

          .rating-distribution {
            flex: 1;
            max-width: 400px;
            
            .rating-bar {
              display: flex;
              align-items: center;
              gap: 10px;
              margin-bottom: 8px;
              
              .stars {
                width: 60px;
                color: #0F1111;
              }
              
              .progress-bar {
                flex: 1;
                height: 16px;
                background: #F0F2F2;
                border-radius: 4px;
                overflow: hidden;
                
                .progress {
                  height: 100%;
                  background: #FFA41C;
                }
              }
              
              .percentage {
                width: 40px;
                color: #565959;
                text-align: right;
              }
            }
          }
        }
      }

      .reviews-list {
        .review-item {
          padding: 20px 0;
          border-bottom: 1px solid #eee;

          &:last-child {
            border-bottom: none;
          }

          .review-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 12px;

            .user-info {
              display: flex;
              align-items: center;
              gap: 8px;
              
              .user-name {
                color: #0F1111;
                font-weight: 500;
              }
            }

            .review-rating {
              display: flex;
              align-items: center;
              gap: 10px;
              
              .review-date {
                color: #565959;
              }
            }
          }

          .review-content {
            color: #0F1111;
            line-height: 20px;
            margin-bottom: 12px;
          }

          .review-images {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            
            .el-image {
              width: 100px;
              height: 100px;
              border-radius: 4px;
              
              &:hover {
                cursor: pointer;
              }
            }
          }
        }
      }
    }
  }
}